package com.otherTest.designpattern.creationalpattern.factory;

/**
 * @Description: shape工厂类
 * @author: conceit
 * @Date: 2018/8/30 18:25
 */
public class ShapeFactory {


    public IShape doDraw(ShapeType shapeType) {
        switch (shapeType) {
            case OVAL:
                return new Oval();

            case CYCLE:
                return new Cycle();
            case SQUARE:
                return new Square();
            default:
                return null;
        }
    }

}
